package com.sharp.join.tk.mybatis.controller;

import com.sharp.join.tk.mybatis.dao.entity.SchoolTeacherJoin;
import com.sharp.join.tk.mybatis.service.SchoolTeacherJoinService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * Title: SchoolTeacherController
 * Description: Copyright: Copyright (c) 2019 Company: BHFAE
 *
 * @author Sharp
 * @date 2022/7/18 16:27
 */
@RestController
public class SchoolTeacherController {
    @Resource
    private SchoolTeacherJoinService schoolTeacherJoinService;

    @GetMapping(value = "/join")
    public List<SchoolTeacherJoin> getSchoolTeacherJoin(@RequestParam(required = false) String schoolId,
                                                        @RequestParam(required = false) String classId,
                                                        @RequestParam(required = false) String teacherId) {
        return schoolTeacherJoinService.getSchoolTeacherJoinList(schoolId, classId, teacherId);
    }

    @GetMapping(value = "/xml")
    public List<SchoolTeacherJoin> getSchoolTeacherJoinByXml(@RequestParam(required = false) String schoolId,
                                                        @RequestParam(required = false) String classId,
                                                        @RequestParam(required = false) String teacherId) {
        return schoolTeacherJoinService.getSchoolTeacherJoinListByXml(schoolId, classId, teacherId);
    }
}
